
<h2>Internationalization</h2>

<p><strong>Usage</strong></p>

<p>The basic messages are stored into the <i>inputEx.messages</i> object :</p>

<pre style="margin-left: 20px">
inputEx.messages = {
   required: "This field is required",
   invalid: "This field is invalid",
   valid: "This field is valid"
};
</pre>

<p>Additional fields should add their messages into the same object : </p>

<pre style="margin-left: 20px">
// Specific message for the email field
inputEx.messages.invalidEmail = "Invalid email, ex: sample@test.com";
</pre>

<p><strong>Contribute !</strong></p>

<p>We are looking for contributors to extend inputEx localizations. If you use inputEx in a foreign language, please contribute by sending the localization file <a href="http://groups.google.com/group/inputex/">on the forum</a>.</p>

<p><strong>Examples</strong></p>

<p>Then we only need one additional file, example with the <a href="fr.js.html">French translation file</a> :</p>

<pre>
	/**
	 * InputEx French localization
	 */
	(function() {

	   var msgs = YAHOO.inputEx.messages;

	   msgs.required = "Ce champ est obligatoire";
	   msgs.invalid = "Ce champ n'est pas valide";
	   msgs.valid = "Ce champ est valide";
	   msgs.invalidEmail = "Email non valide; ex: michel.dupont@fai.fr";
	   msgs.selectColor = "S&eacute;lectionnez une couleur :";
	   msgs.invalidPassword = ["Le mot de passe doit contenir au moins "," caract&egrave;res (lettres ou chiffres)"];
	   msgs.invalidPasswordConfirmation = "Les mots de passe entrés ne sont pas identiques !";
	   msgs.capslockWarning = "Attention: touche majuscule activée";
	   msgs.invalidDate = "Date non valide; ex: 25/01/2007";
	   msgs.defaultDateFormat = "d/m/Y";
	   msgs.shortMonths = ["Jan", "Fév", "Mars", "Avril", "Mai", "Juin", "Juil", "Août", "Sept", "Oct", "Nov", "Déc"];
	   msgs.months = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"];
	   msgs.weekdays1char =  ["D", "L", "M", "M", "J", "V", "S"];
	   msgs.shortWeekdays = ["Di","Lu","Ma","Me","Je","Ve","Sa"];
	   msgs.selectMonth = "- Choisissez -";
	   msgs.dayTypeInvite = "Jour";
	   msgs.monthTypeInvite = "Mois";
	   msgs.yearTypeInvite = "Année";
	   msgs.cancelEditor = "annuler";
	   msgs.okEditor = "Ok";
	   msgs.defautCalendarOpts = {
	      navigator: {
	               strings : {
	                   month: "Choisissez un mois",
	                   year: "Entrez une année",
	                   submit: "Ok",
	                   cancel: "Annuler",
	                   invalidYear: "Année non valide"
	               }
	      },
	      start_weekday: 1 // la semaine commence un lundi
	   };


	   // Datatable
	   msgs.saveText = "Sauver";
	   msgs.cancelText = "Annuler";
	   msgs.modifyText = "modifier";
	   msgs.deleteText = "supprimer";
	   msgs.insertItemText = "Ajouter";
	   msgs.confirmDeletion = "Êtes-vous sûr ?"

	})();
</pre>